export default class Rect {
  constructor(props) {

    const {
      top,
      left,
      width,
      height,
      radius = 0,
      fill,
      lineStyle,
    } = props;

    let graphics = new PIXI.Graphics();

    if (lineStyle) {
      console.log(...lineStyle);
      graphics.lineStyle(...lineStyle);
    }

    if (fill) {
      graphics.beginFill(fill);
    } else {
      graphics.beginFill(0x000000);
      graphics.alpha = 0;
    }

    graphics.drawRoundedRect(left, top, width, height, radius);

    this.graphics = graphics;

    return this.graphics;
  }
}
